/*
 * button.h
 *
 *  Created on: 14 May 2015
 *      Author: yiqi.pan
 */

#ifndef SRC_BUTTON_H_
#define SRC_BUTTON_H_


enum
{
	NO_PRESS,
	PRESS_200MS, // 200ms press
	PRESS_1S, // 1s press
	PRESS_4S  //4s press
};

enum
{
	USER_BUTTON,
	RESET_BUTTON,
	NUMBER_OF_BUTTONS
};

void init_btn(uint8_t btn_id);
void start_btn_monitor(uint8_t btn_id);
void stop_btn_monitor(uint8_t btn_id);
void btn_monitor(uint8_t btn_id);
uint8_t check_fetch_btn_event(uint8_t btn_id);

#endif /* SRC_BUTTON_H_ */
